/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marifnst.jse71.creating_and_using_arrays;

/**
 *
 * @author arifnasution
 */
public class SampleArray
{
    // sample one dimension array
    private int[] sampleOneDimension_1 = new int[ 3 ];
    private int sampleOneDimension_2[] = new int[ 3 ];
    // sample two dimension array
    private int[][] sampleTwoDimension_1 = new int[ 2 ][ 2 ];
    private int sampleTwoDimension_2[][] = new int[ 2 ][ 2 ];

    public int[] getSampleOneDimension_1()
    {
        return sampleOneDimension_1;
    }

    public void setSampleOneDimension_1( int[] sampleOneDimension_1 )
    {
        this.sampleOneDimension_1 = sampleOneDimension_1;
    }

    public int[] getSampleOneDimension_2()
    {
        return sampleOneDimension_2;
    }

    public void setSampleOneDimension_2( int[] sampleOneDimension_2 )
    {
        this.sampleOneDimension_2 = sampleOneDimension_2;
    }

    public int[][] getSampleTwoDimension_1()
    {
        return sampleTwoDimension_1;
    }

    public void setSampleTwoDimension_1( int[][] sampleTwoDimension_1 )
    {
        this.sampleTwoDimension_1 = sampleTwoDimension_1;
    }

    public int[][] getSampleTwoDimension_2()
    {
        return sampleTwoDimension_2;
    }

    public void setSampleTwoDimension_2( int[][] sampleTwoDimension_2 )
    {
        this.sampleTwoDimension_2 = sampleTwoDimension_2;
    }
    public void oneDimension()
    {
        sampleOneDimension_1[0] = 0;
        sampleOneDimension_1[1] = 1;
        sampleOneDimension_1[2] = 2;

        sampleOneDimension_2[0] = 3;
        sampleOneDimension_2[1] = 4;
        sampleOneDimension_2[2] = 5;
    }

    public void twoDimension()
    {
        sampleTwoDimension_1[0][0] = 0;
        sampleTwoDimension_1[0][1] = 1;
        sampleTwoDimension_1[1][0] = 2;
        sampleTwoDimension_1[1][1] = 3;

        sampleTwoDimension_2[0][0] = 4;
        sampleTwoDimension_2[0][1] = 5;
        sampleTwoDimension_2[1][0] = 6;
        sampleTwoDimension_2[1][1] = 7;
    }
}
